package com.cn.controller;

import com.cn.service.StorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class StorageController {
    @Autowired
    private StorageService storageService;
    
    @GetMapping("/decrease")
    public void decreaseStorage(Long productId , Integer count){
        storageService.decrease(productId, count);
    }
}
